import { defineUserConfig } from "vuepress";
import { registerComponentsPlugin }  from '@vuepress/plugin-register-components';
import { searchPlugin } from "@vuepress/plugin-search";
import pkg from '@vuepress/utils';
import theme from "./theme.js";


const { path } = pkg;

export default defineUserConfig({
  base: "/myblog/",

  locales: {
    "/": {
      lang: "zh-CN",
      title: "博客演示",
      description: "vuepress-theme-hope 的博客演示",
    },
  },

  theme,

  shouldPrefetch: false,
  plugins: [
    registerComponentsPlugin({
      componentsDir: path.resolve(__dirname, './components'),
    }),
    searchPlugin({
      // 搜索的配置选项
      locales: {
        '/': {
          placeholder: 'Search',
        },
      },
    }),
  ],
  clientConfigFile: path.resolve(__dirname, './client.js'),
});
